﻿using System.Collections.Generic;

namespace Test.Site.Data.Constant
{
    /// <summary>
    /// 错误码
    /// </summary>
    public static class ErrorCodes
    {

        public const int DATA_VALIDATE_FAILED = 100;
        public const int NICKNAME_EXISTED = 101;

        public const int OK = 200;
        public const int USER_NOT_BIND = 201;
        public const int PLEASE_UPLOAD_FACE = 202;
       // public const int PLEASE_SELECT_SCHOOL = 203;


        public const int VERSION_NOCHANGED = 300;

        public const int TOKEN_ERROR = 400;
        public const int NOTFOUND = 404;

        public const int SERVER_ERROR = 500;
        public const int NEARBY_MUST_WITH_LOCATION = 501;
        public const int SEND_SMS_VALIDATE_FAILED = 502;
        public const int SMS_CODE_ERROR = 503;
        public const int PLEASE_SELECT_NEEDTYPE = 504;
        

        public const int UNKNOWN = 635;
       // public const int CREATE_IMACCOUNT_ERROR = 600;

        public const int USER_BANED = 700;
        public const int USER_LOCKED = 701;

        public const int AUTHORIZE_ERROR = 800;
        public const int OPERATE_TOO_FREQUENT = 801;


        public static Dictionary<int, string> CodeMsgDict = new Dictionary<int, string>()
        {
            { OK, "OK"},
            { SERVER_ERROR, "Server Error"},
            { VERSION_NOCHANGED, "版本未改动。" },
            { NEARBY_MUST_WITH_LOCATION, "筛选附近，必须输入坐标！" },
            { TOKEN_ERROR, "token无效！" },
            { SEND_SMS_VALIDATE_FAILED, "不好了，短信君坏掉了！" },
            { SMS_CODE_ERROR, "短信验证码错误" },
            { UNKNOWN, "未知错误" },
            { USER_BANED, "该用户被禁用！" },
            { USER_LOCKED, "该用户被锁定，请5分钟后重试！"},
           // { CREATE_IMACCOUNT_ERROR, "生成im账号错误" },
            { NOTFOUND, "未找到指定的记录" },
            { AUTHORIZE_ERROR, "无权操作"},
            { OPERATE_TOO_FREQUENT, "操作过于频繁，请稍后再试" },
            { USER_NOT_BIND, "用户未绑定" },
            { NICKNAME_EXISTED, "昵称已被占用"},
            { PLEASE_UPLOAD_FACE, "请上传头像" },
            { PLEASE_SELECT_NEEDTYPE, "请选择一个标签" },
           // { PLEASE_SELECT_SCHOOL, "请选择一个学校" }
        };

    }
}
